package com.meatball.iot.driver.envmonitoring.enums

enum class CoordinateTypeEnum(val code: Short, val description: String, val mnc: String? = null) {
    GPS(3, "GPS经纬度"),
    UNI_COM(1, "中国联通基站", "01"),
    MOBILE(2, "中国移动基站", "00"),
    BAIDU(0, "百度经纬度");

    companion object {
        fun fromCode(code: Short): CoordinateTypeEnum {
            return entries.find { it.code == code } ?: throw IllegalArgumentException("未知的坐标类型代码: $code")
        }
    }
}